(function () {
    angular.module('app')
        .component('xxSidenav',{
            templateUrl:'/app/common/sidenav/sidenav.html',
            controller:ctrl
        });

    function ctrl($scope,$state) {
        $scope.drugList = function () {
            $state.go('user.drug-list');
        };
        $scope.searchDrug = function () {
            $state.go('user.search-drug');
        };
        $scope.pharmacyInfo = function () {
            $state.go('user.pharmacy-info');
        };
        $scope.shoppingCart = function() {
            $state.go('user.shopping-cart');
        }
        $scope.orderList = function () {
            $state.go('user.order-list');
        };
        $scope.personInfo = function () {
            $state.go('user.person-info');
        };
        $scope.logout = function () {
            $state.go('login');
        };
    }
})();